﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// TP_CarInfo数据模型对象
    /// </summary>
    [Serializable]
    public partial class TP_CarInfoMod
    {
        /// <summary>
        /// 初始化TP_CarInfo数据模型对象
        /// </summary>
        public TP_CarInfoMod()
        {
            
        }
        /// <summary>
        /// 初始化TP_CarInfo数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="carNo">CarNo</param>
        /// <param name="changeTime">ChangeTime</param>
        /// <param name="iD">ID</param>
        /// <param name="isHide">isHide</param>
        public TP_CarInfoMod(string carNo,DateTime changeTime,long iD,int isHide)
        {
            //给CarNo字段赋值
            this.CarNo = carNo;
            //给ChangeTime字段赋值
            this.ChangeTime = changeTime;
            //给ID字段赋值
            this.ID = iD;
            //给isHide字段赋值
            this.IsHide = isHide;
        }
        /// <summary>
        /// 初始化TP_CarInfo数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="carNo">CarNo</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="carModel">CarModel</param>
        /// <param name="corpID">CorpID</param>
        /// <param name="deptID">DeptID</param>
        /// <param name="changeTime">ChangeTime</param>
        /// <param name="patrolID">PatrolID</param>
        /// <param name="regionID">RegionID</param>
        /// <param name="userid">userid</param>
        /// <param name="iD">ID</param>
        /// <param name="userName">userName</param>
        /// <param name="isHide">isHide</param>
        /// <param name="deviceSIM">DeviceSIM</param>
        /// <param name="remark">Remark</param>
        public TP_CarInfoMod(string carNo,string deviceNo,string carModel,string corpID,string deptID,DateTime changeTime,string patrolID,string regionID,string userid,long iD,string userName,int isHide,string deviceSIM,string remark)
        {
            //给CarNo字段赋值
            this.CarNo = carNo;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给CarModel字段赋值
            this.CarModel = carModel;
            //给CorpID字段赋值
            this.CorpID = corpID;
            //给DeptID字段赋值
            this.DeptID = deptID;
            //给ChangeTime字段赋值
            this.ChangeTime = changeTime;
            //给PatrolID字段赋值
            this.PatrolID = patrolID;
            //给RegionID字段赋值
            this.RegionID = regionID;
            //给userid字段赋值
            this.Userid = userid;
            //给ID字段赋值
            this.ID = iD;
            //给userName字段赋值
            this.UserName = userName;
            //给isHide字段赋值
            this.IsHide = isHide;
            //给DeviceSIM字段赋值
            this.DeviceSIM = deviceSIM;
            //给Remark字段赋值
            this.Remark = remark;
        }
        
		//属性存储数据的变量
        private string _carNo;
        private string _deviceNo;
        private string _carModel;
        private string _corpID;
        private string _deptID;
        private DateTime _changeTime;
        private string _patrolID;
        private string _regionID;
        private string _userid;
        private long _iD;
        private string _userName;
        private int _isHide;
        private string _deviceSIM;
        private string _remark;
        
        /// <summary>
        /// CarNo
        /// </summary>
        public string CarNo
        {
            get { return this._carNo; }
            set { this._carNo = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// CarModel
        /// </summary>
        public string CarModel
        {
            get { return this._carModel; }
            set { this._carModel = value; }
        }
        /// <summary>
        /// CorpID
        /// </summary>
        public string CorpID
        {
            get { return this._corpID; }
            set { this._corpID = value; }
        }
        /// <summary>
        /// DeptID
        /// </summary>
        public string DeptID
        {
            get { return this._deptID; }
            set { this._deptID = value; }
        }
        /// <summary>
        /// ChangeTime
        /// </summary>
        public DateTime ChangeTime
        {
            get { return this._changeTime; }
            set { this._changeTime = value; }
        }
        /// <summary>
        /// PatrolID
        /// </summary>
        public string PatrolID
        {
            get { return this._patrolID; }
            set { this._patrolID = value; }
        }
        /// <summary>
        /// RegionID
        /// </summary>
        public string RegionID
        {
            get { return this._regionID; }
            set { this._regionID = value; }
        }
        /// <summary>
        /// userid
        /// </summary>
        public string Userid
        {
            get { return this._userid; }
            set { this._userid = value; }
        }
        /// <summary>
        /// ID
        /// </summary>
        public long ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// userName
        /// </summary>
        public string UserName
        {
            get { return this._userName; }
            set { this._userName = value; }
        }
        /// <summary>
        /// isHide
        /// </summary>
        public int IsHide
        {
            get { return this._isHide; }
            set { this._isHide = value; }
        }
        /// <summary>
        /// DeviceSIM
        /// </summary>
        public string DeviceSIM
        {
            get { return this._deviceSIM; }
            set { this._deviceSIM = value; }
        }
        /// <summary>
        /// Remark
        /// </summary>
        public string Remark
        {
            get { return this._remark; }
            set { this._remark = value; }
        }
        
        /// <summary>
        /// 对比两个TP_CarInfo数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的TP_CarInfo数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成TP_CarInfo数据模型对象
            TP_CarInfoMod tP_CarInfoMod = obj as TP_CarInfoMod;
            //判断是否转换成功
            if (tP_CarInfoMod == null) return false;
            //进行匹配属性的值
            return
                //判断CarNo是否一致
                this.CarNo == tP_CarInfoMod.CarNo &&
                //判断DeviceNo是否一致
                this.DeviceNo == tP_CarInfoMod.DeviceNo &&
                //判断CarModel是否一致
                this.CarModel == tP_CarInfoMod.CarModel &&
                //判断CorpID是否一致
                this.CorpID == tP_CarInfoMod.CorpID &&
                //判断DeptID是否一致
                this.DeptID == tP_CarInfoMod.DeptID &&
                //判断ChangeTime是否一致
                this.ChangeTime == tP_CarInfoMod.ChangeTime &&
                //判断PatrolID是否一致
                this.PatrolID == tP_CarInfoMod.PatrolID &&
                //判断RegionID是否一致
                this.RegionID == tP_CarInfoMod.RegionID &&
                //判断userid是否一致
                this.Userid == tP_CarInfoMod.Userid &&
                //判断ID是否一致
                this.ID == tP_CarInfoMod.ID &&
                //判断userName是否一致
                this.UserName == tP_CarInfoMod.UserName &&
                //判断isHide是否一致
                this.IsHide == tP_CarInfoMod.IsHide &&
                //判断DeviceSIM是否一致
                this.DeviceSIM == tP_CarInfoMod.DeviceSIM &&
                //判断Remark是否一致
                this.Remark == tP_CarInfoMod.Remark;
        }
        /// <summary>
        /// 将当前TP_CarInfo数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将TP_CarInfo数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将CarNo进行按位异或运算处理
                (this.CarNo == null ? 2147483647 : this.CarNo.GetHashCode()) ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将CarModel进行按位异或运算处理
                (this.CarModel == null ? 2147483647 : this.CarModel.GetHashCode()) ^
                //将CorpID进行按位异或运算处理
                (this.CorpID == null ? 2147483647 : this.CorpID.GetHashCode()) ^
                //将DeptID进行按位异或运算处理
                (this.DeptID == null ? 2147483647 : this.DeptID.GetHashCode()) ^
                //将ChangeTime进行按位异或运算处理
                this.ChangeTime.GetHashCode() ^
                //将PatrolID进行按位异或运算处理
                (this.PatrolID == null ? 2147483647 : this.PatrolID.GetHashCode()) ^
                //将RegionID进行按位异或运算处理
                (this.RegionID == null ? 2147483647 : this.RegionID.GetHashCode()) ^
                //将userid进行按位异或运算处理
                (this.Userid == null ? 2147483647 : this.Userid.GetHashCode()) ^
                //将ID进行按位异或运算处理
                this.ID.GetHashCode() ^
                //将userName进行按位异或运算处理
                (this.UserName == null ? 2147483647 : this.UserName.GetHashCode()) ^
                //将isHide进行按位异或运算处理
                this.IsHide.GetHashCode() ^
                //将DeviceSIM进行按位异或运算处理
                (this.DeviceSIM == null ? 2147483647 : this.DeviceSIM.GetHashCode()) ^
                //将Remark进行按位异或运算处理
                (this.Remark == null ? 2147483647 : this.Remark.GetHashCode());
        }
        /// <summary>
        /// 将当前TP_CarInfo数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前TP_CarInfo数据模型对象转换成字符串副本
            return
                "[" +
                //将CarNo转换成字符串
                this.CarNo + "," +
                //将ChangeTime转换成字符串
                this.ChangeTime + "," +
                //将ID转换成字符串
                this.ID + "," +
                //将isHide转换成字符串
                this.IsHide +
                "]";
        }
    }
}
